package cn.edu.scau.cmi.chenjia.client;

import java.util.Scanner;

import cn.edu.scau.cmi.chenjia.simpleFactoryMethod.MeatFactory; 
import cn.edu.scau.cmi.chenjia.simpleFactoryMethod.Meat; 

public class SimpleFactoryMethodClient {
		public static void main(String args[]) {
			System.out.println("Please enter the production object:");
			for(int i=0;;i++) {
			Scanner in = new Scanner(System.in);
			String meatTypeString=in.nextLine();
			Meat meat=MeatFactory.getMeat(meatTypeString);
			if(meat!=null)
				meat.cook();
			else
				System.out.println("Input error!");
			}
		}
}
